 DEFINE MISSIONS 1              // Total Missions Available
DEFINE MISSION 0 AT @MISSN_14  //Chinese Steak

DEFINE EXTERNAL_SCRIPTS 0 

DEFINE UNKNOWN_EMPTY_SEGMENT 0

DEFINE UNKNOWN_THREADS_MEMORY 500

{$VERSION 3.1.0027}
var
 $PLAYER_CHAR: Player
end // var 
//Main thread starts here
03A4: name_thread 'MAIN' 
//Set the screen BLACK immediately
016A: fade 0 time 0           
01F0: set_max_wanted_level_to 6 
0111: toggle_wasted_busted_check 0 
00C0: set_current_time_hours_to 8 minutes_to 0 
//Loads Tenpenny as #SPECIAL01 or 290
023C: load_special_actor 'TENPEN' as 1 
//Create Player at Station
Camera.SetAtPos(-1630.425, 725.9995, 14.0557)
$PLAYER_CHAR = Player.Create(#NULL, -2126.9312, 652.1807, 52.3672)
Player.Build($PLAYER_CHAR)
//Changes the player to ped model 290 Tenpenny
09C7: change_player $PLAYER_CHAR model_to 290 
01F5: $PLAYER_ACTOR = create_player_actor $PLAYER_CHAR 
07AF: $PLAYER_GROUP = player $PLAYER_CHAR group 

01B6: set_weather 1 
0001: wait 0 ms 
01B4: toggle_player $PLAYER_CHAR can_move false //We shut down control for the cameras to work 
04BB: select_interior 0 
0629: change_integer_stat 181 to 4 
016C: restart_if_wasted_at -1630.8995 721.0715 14.6169 angle 90.0 town_number 0 
016D: restart_if_busted_at -1630.8995 721.0715 14.6169 angle 90.0 town_number 0 
// Note: your missions have to use the variable defined here
0180: set_on_mission_flag_to $ONMISSION 
$ONMISSION = 0 
0004: $DEFAULT_WAIT_TIME = 250
03E6: remove_text_box 
// START GAME
//start_mission 0                 //First Mission and Only Mission
$CRASH_MARKER = Marker.CreateIconAndSphere(16, -2126.9312, 654.1807, 52.3672)

016A: fade 1 time 500
wait 1000
01B4: toggle_player $PLAYER_CHAR can_move true
 
:MAIN_LOOP
0001: wait $DEFAULT_WAIT_TIME ms
00BF: $TIME_HOURS = current_time_hours, $TIME_MINS = current_time_minutes
//This code allows restart of mission 
if and
  $ONMISSION == 0               //No current mission and enters the sphere
  00ED: actor $PLAYER_ACTOR 0 near_point -2126.9312 654.1807 radius 1.0 1.0 on_foot 
then
    
    Marker.Disable($CRASH_MARKER)   //Turn off the marker on the map and the red ring
    start_mission 0 
end


0002: jump @MAIN_LOOP 
 
 :MISSN_14
 03A4: name_thread 'MISSN_14'
 $ONMISSION = 1
 0050: gosub @MISSN_14_BEGIN
 00D6: if
 0112:   wasted_or_busted
 004D: jump_if_false @MISSN_14_END
 0050: gosub @MISSN_14_FAILED
 
 :MISSN_14_END
 0050: gosub @MISSN_14_CLEANUP
 004E: end_thread
 
 :MISSN_14_BEGIN
 fade 0 time 1500 
 :MISSN_14_FO01
 wait 0 
if 
not fading 
jf @MISSN_14_FO01
//CutScene
Model.Load(#MICRO_UZI)
Model.Load(#DNB1)
Model.Load(#DNB2)
Model.Load(#DNB3)
Model.Load(#AK47)
Model.Load(#TRIADB)
Model.Load(#SNIPER)
Model.Load(#SENTINEL)
Model.Load(#SANCHEZ)
Model.Load(#OMOST)
Model.Load(#TRIADA)
Model.Load(#TRIADB)
Model.Load(#FBI)
Model.Load(#ESPERANT)

023C: load_special_actor 'WUZIMU' as 2
038B: load_requested_models 

:MISSN_14_MODELCHK1
wait 0
if and
Model.Available(#SANCHEZ)
Model.Available(#OMOST)
Model.Available(#AK47)
Model.Available(#TRIADB)
Model.Available(#ESPERANT)
Model.Available(#FBI)
Model.Available(#SPECIAL02)
jf @MISSN_14_MODELCHK1

:MISSN_14_MODELCHK2
wait 0
if and
Model.Available(#MICRO_UZI)
Model.Available(#DNB1)     
Model.Available(#DNB2)     
Model.Available(#DNB3)     
Model.Available(#TRIADA)   
Model.Available(#TRIADB)   
Model.Available(#SNIPER)   
Model.Available(#SENTINEL)
jf @MISSN_14_MODELCHK2

//Dress CJ for cut scene
09C7: change_player $PLAYER_CHAR model_to #NULL 
Player.SetClothes($PLAYER_CHAR, "suit1blue", "suit1", Torso)
Player.SetClothes($PLAYER_CHAR, "suit1trblue", "suit1tr", Legs)
Player.SetClothes($PLAYER_CHAR, "shoedressblk", "shoe", Shoes)
Player.SetClothes($PLAYER_CHAR, "goatee", "HEAD", Head)  
Player.Build($PLAYER_CHAR)
//Changes the player to ped model 290 Tenpenny
09C7: change_player $PLAYER_CHAR model_to 290 

0395: clear_area 1 at -2173.9055 644.0897 49.4375 radius 100.0 
02A3: enable_widescreen true
Player.CanMove($PLAYER_CHAR) = false
Actor.PutAt($PLAYER_ACTOR,-2127.3857, 638.6126, 72.7485)  
Actor.Angle($PLAYER_ACTOR) = 70.9
Actor.Create(100@,24,#FBI,-2127.0, 637.5, 72.7485)
Actor.Angle(100@) = 15.0
Actor.Create(101@,24,#SPECIAL02,-2153.0, 650.5, 52.3672)
Actor.Create(102@,24,#NULL,-2153.5, 643.0, 52.3672)
Actor.Angle(101@) = 270.0
Actor.Angle(102@) = 270.0

Car.Create(201@,#ESPERANT,-2150.9136, 652.3053, 52.2656)
Car.Angle(201@) = 180.0
Camera.Restore_WithJumpCut
fade 1 time 1500 
0001: wait 1000 ms
03C7: set_sensitivity_to_crime 0.0 
03DE: set_pedestrians_density_multiplier_to 7.0 
01EB: set_traffic_density_multiplier_to 0.3 
01F7: set_player $PLAYER_CHAR ignored_by_cops true 
054C: use_GXT_table 'JABM14' 
067E: put_camera_on_actor $PLAYER_ACTOR with_offset 5.0 -2.5 1.0 point_to_actor 100@ 0.0 mode 2 
wait 1000
:MISSN_14_FI01
 wait 0 
if 
not fading 
jf @MISSN_14_FI01 
//FBI talks to Tenpenny 
00BC: show_text_highpriority GXT 'CS04' time 10000 flag 1  
03CF: load_wav 44416 as 1 
gosub @MISSN_14_PLAYSND
05CB: AS_actor 102@ enter_car 201@ as_driver -1 ms 
05CA: AS_actor 101@ enter_car 201@ passenger_seat 0 -1 ms 
067E: put_camera_on_actor $PLAYER_ACTOR with_offset 0.0 2.5 2.0 point_to_actor 102@ 0.0 mode 2 
wait 2000
067E: put_camera_on_actor $PLAYER_ACTOR with_offset 20.0 15.0 -19.0 point_to_actor 102@ 0.0 mode 2
:MISSN_14_CARLWUZI
wait 0
if and
Actor.InCar(101@,201@)
Actor.InCar(102@,201@)
jf @MISSN_14_CARLWUZI

05D1: AS_actor 102@ drive_car 201@ to -2248.8323 639.209 48.8349 speed 15.0 3 model #NULL 5  
00BC: show_text_highpriority GXT 'CS05' time 10000 flag 1  
03CF: load_wav 44417 as 1 
gosub @MISSN_14_PLAYSND

067E: put_camera_on_actor 100@ with_offset 5.0 -2.5 1.0 point_to_actor 100@ 0.0 mode 2 
00BC: show_text_highpriority GXT 'CS01' time 10000 flag 1  
03CF: load_wav 44413 as 1 
gosub @MISSN_14_PLAYSND
0A1D: AS_actor $PLAYER_ACTOR rotate_to_and_look_at_actor 100@ 
00BC: show_text_highpriority GXT 'CS06' time 10000 flag 1  
03CF: load_wav 44418 as 1 
gosub @MISSN_14_PLAYSND
00BC: show_text_highpriority GXT 'CS02' time 10000 flag 1  
03CF: load_wav 44414 as 1 
gosub @MISSN_14_PLAYSND
00BC: show_text_highpriority GXT 'CS07' time 10000 flag 1  
03CF: load_wav 44419 as 1 
gosub @MISSN_14_PLAYSND 
00BC: show_text_highpriority GXT 'CS03' time 10000 flag 1  
03CF: load_wav 44415 as 1 
gosub @MISSN_14_PLAYSND 
00BC: show_text_highpriority GXT 'CS08' time 10000 flag 1  
03CF: load_wav 44420 as 1 
gosub @MISSN_14_PLAYSND 
//begin mission 
fade 0 time 1500 
:MISSN_14_FO02
wait 0 
if 
not fading 
jf @MISSN_14_FO02  
Actor.DestroyInstantly(100@)
00BE: text_clear_all                
//Create a car with support
205@ = Car.Create(#SENTINEL, -2126.15, 650.5, 52.26)
0229: set_car 205@ primary_color_to 0 secondary_color_to 0 
Car.Angle(205@) = 60.0
0129: 105@ = create_actor_pedtype 25 model #FBI in_car 205@ driverseat 
01C8: 106@ = create_actor_pedtype 25 model #FBI in_car 205@ passenger_seat 1 
01C8: 107@ = create_actor_pedtype 25 model #FBI in_car 205@ passenger_seat 2 
 
01B2: give_actor 105@ weapon 30 ammo 99999 
01B2: give_actor 106@ weapon 30 ammo 99999
01B2: give_actor 107@ weapon 34 ammo 99999
Actor.WeaponAccuracy(105@) = 60
Actor.WeaponAccuracy(106@) = 60
Actor.WeaponAccuracy(107@) = 90
0430: put_actor $PLAYER_ACTOR into_car 205@ passenger_seat 0 
035F: actor 105@ armour = 100 
035F: actor 106@ armour = 100 
035F: actor 107@ armour = 100 

//Remove
01B2: give_actor $PLAYER_ACTOR weapon 30 ammo 500
035F: actor $PLAYER_ACTOR armour = 100 
//Remove

0615: define_AS_pack_begin 132@ 
05D1: AS_actor -1 drive_car -1 to -2139.8416 718.5884 69.0947 speed -1 3 model #NULL 0 
05D1: AS_actor -1 drive_car -1 to -2238.8911 731.4222 48.9464 speed -1 3 model #NULL 0 
05D1: AS_actor -1 drive_car -1 to -2271.3745 649.0259 49.2969 speed -1 3 model #NULL 0 
0616: define_AS_pack_end 132@ 
0618: assign_actor 105@ to_AS_pack 132@
061B: remove_references_to_AS_pack 132@ 

Camera.SetBehindPlayer
Camera.Restore_WithJumpCut
wait 1500                                           
fade 1 time 1500 
:MISSN_14_FI02
wait 0 
if 
not fading 
jf @MISSN_14_FI02 

//CJ and Wuzi go to meeting
//Create Extras
0376: 243@ = create_random_actor_at -2182.969 645.0695 48.4453 
0376: 244@ = create_random_actor_at -2183.643 642.2832 48.4453 
0376: 245@ = create_random_actor_at -2190.507 636.5036 48.4429 
0376: 246@ = create_random_actor_at -2200.647 641.6252 48.4429 
0376: 247@ = create_random_actor_at -2200.622 642.8997 48.4429 
0376: 248@ = create_random_actor_at -2223.243 644.5712 48.4448 
0376: 249@ = create_random_actor_at -2235.814 642.5659 48.4472

Car.PutAt(201@,-2248.8323, 639.209, 48.8349)
Car.Angle(201@) = 0.0
05D3: AS_actor 244@ goto_point -2190.978 646.0287 48.4453 mode 4 -2 ms // versionA 
05D3: AS_actor 245@ goto_point -2192.964 644.2189 48.4453 mode 4 -2 ms // versionA 
0615: define_AS_pack_begin 132@ 
0639: AS_actor -1 rotate_to_actor 247@ 
0605: actor -1 perform_animation_sequence "IDLE_CHAT" IFP_file "PED" 8.0 loop 1 0 0 0 time -1 // versionA 
0616: define_AS_pack_end 132@ 
0618: assign_actor 246@ to_AS_pack 132@ 
061B: remove_references_to_AS_pack 132@ 
0615: define_AS_pack_begin 132@ 
0639: AS_actor -1 rotate_to_actor 246@ 
0605: actor -1 perform_animation_sequence "IDLE_CHAT" IFP_file "PED" 8.0 loop 1 0 0 0 time -1 // versionA 
0616: define_AS_pack_end 132@ 
0618: assign_actor 247@ to_AS_pack 132@ 
061B: remove_references_to_AS_pack 132@ 
05D3: AS_actor 248@ goto_point -2200.941 644.4352 48.4429 mode 4 -2 ms
Actor.Angle(249@) = 10.5
//Wait for Tenpenny to arrive
20@ = 0
:MISSN_14_LOOP02
wait 0
if and
20@ == 0
0100:   actor $PLAYER_ACTOR in_sphere -2142.0381 667.878 55.6082 radius 4.0 4.0 4.0 sphere 0 in_car 
then
03E5: show_text_box 'CS09'
20@ = 1
end
if and
20@ == 1
0100:   actor $PLAYER_ACTOR in_sphere -2190.1799 732.809 55.5866 radius 4.0 4.0 4.0 sphere 0 in_car 
then
03E5: show_text_box 'CS10'
20@ = 2
end
if                                     
0103:   actor $PLAYER_ACTOR in_sphere -2271.3745 649.0259 49.2969 radius 4.0 4.0 4.0 sphere 0 stopped_in_car 
jf @MISSN_14_LOOP02
00BE: text_clear_all 

01EB: set_traffic_density_multiplier_to 0.0 
060A: create_decision_maker_type 2 store_to 34@
060A: create_decision_maker_type 0 store_to 35@

0746: set_acquaintance 4 of_actors_pedtype 24 to_actors_pedtype 0 
0746: set_acquaintance 4 of_actors_pedtype 24 to_actors_pedtype 25
0746: set_acquaintance 4 of_actors_pedtype 25 to_actors_pedtype 24

060B: set_actor 105@ decision_maker_to 34@ 
060B: set_actor 106@ decision_maker_to 34@ 
060B: set_actor 107@ decision_maker_to 34@ 

067E: put_camera_on_actor 249@ with_offset -18.0 0.0 1.2 point_to_actor 102@ 0.0 mode 2 

0615: define_AS_pack_begin 132@ 
05B9: AS_actor -1 stay_idle 1000 ms 
0633: AS_actor -1 exit_car 
05B9: AS_actor -1 stay_idle 300 ms 
05F5: AS_actor -1 goto_point -2245.1646 643.2448 49.4453 mode 4 -2 ms
0605: actor -1 perform_animation_sequence "IDLE_CHAT" IFP_file "PED" 8.0 loop 0 0 0 0 time 6000 // versionA 
05F5: AS_actor -1 goto_point -2173.9055 644.0897 49.4375 mode 6 -2 ms
0616: define_AS_pack_end 132@ 
0618: assign_actor 101@ to_AS_pack 132@
0618: assign_actor 102@ to_AS_pack 132@ 
061B: remove_references_to_AS_pack 132@ 

:MISSN_14_LOOP03
wait 0
if 
00EC:   actor 102@ 0 near_point -2210.0 644.0 radius 5.0 5.0 
then
Player.CanMove($PLAYER_CHAR) = true
Camera.SetBehindPlayer
Camera.Restore
end

if 
00EC:   actor 102@ 0 near_point -2173.9055 644.0897 radius 3.0 3.0 
jf @MISSN_14_LOOP03

02A3: enable_widescreen false
Actor.DestroyInstantly(101@)
Actor.DestroyInstantly(102@)
wait 500  
020C: create_explosion_with_radius 6 at -2173.9055 644.0897 49.4375
wait 250
020C: create_explosion_with_radius 6 at -2173.9055 644.0897 49.4375
wait 150
020C: create_explosion_with_radius 6 at -2173.9055 644.0897 49.4375

05CD: AS_actor 105@ exit_car 205@ 
05CD: AS_actor 106@ exit_car 205@ 
05CD: AS_actor 107@ exit_car 205@ 
03E5: show_text_box 'CS11'  

05DA: AS_actor 243@ run_away_in_panic_from -2173.9055 644.0897 49.4375 away_radius 100.0 timelimit 15000 
05DA: AS_actor 244@ run_away_in_panic_from -2173.9055 644.0897 49.4375 away_radius 100.0 timelimit 15000 
05DA: AS_actor 245@ run_away_in_panic_from -2173.9055 644.0897 49.4375 away_radius 100.0 timelimit 15000 
05DA: AS_actor 246@ run_away_in_panic_from -2173.9055 644.0897 49.4375 away_radius 100.0 timelimit 15000 
05DA: AS_actor 247@ run_away_in_panic_from -2173.9055 644.0897 49.4375 away_radius 100.0 timelimit 15000 
05DA: AS_actor 248@ run_away_in_panic_from -2173.9055 644.0897 49.4375 away_radius 100.0 timelimit 15000 
05DA: AS_actor 249@ run_away_in_panic_from -2173.9055 644.0897 49.4375 away_radius 100.0 timelimit 15000 

202@ = Car.Create(#SENTINEL, -2368.0596, 665.8182, 34.7064)
Car.Angle(202@) = 270.0
0129: 140@ = create_actor_pedtype 24 model #DNB1 in_car 202@ driverseat 
01C8: 141@ = create_actor_pedtype 24 model #DNB2 in_car 202@ passenger_seat 0 
01C8: 142@ = create_actor_pedtype 24 model #DNB3 in_car 202@ passenger_seat 1 
01C8: 143@ = create_actor_pedtype 24 model #DNB2 in_car 202@ passenger_seat 2 
01B2: give_actor 140@ weapon 28 ammo 500 
01B2: give_actor 141@ weapon 28 ammo 500 
01B2: give_actor 142@ weapon 28 ammo 500 
01B2: give_actor 143@ weapon 28 ammo 500 
Actor.WeaponAccuracy(140@) = 80
Actor.WeaponAccuracy(141@) = 80
Actor.WeaponAccuracy(142@) = 80
Actor.WeaponAccuracy(143@) = 80
Car.SetSpeedInstantly(202@, 30.0)
                                                    
03DE: set_pedestrians_density_multiplier_to 0.0 
203@ = Car.Create(#SENTINEL, -2253.0, 580.0, 34.6033)       
Car.Angle(203@) = 0.0
Car.SetImmunities(203@,1,1,1,1,1)
0129: 144@ = create_actor_pedtype 24 model #DNB2 in_car 203@ driverseat 
01C8: 145@ = create_actor_pedtype 24 model #DNB1 in_car 203@ passenger_seat 0 
01C8: 146@ = create_actor_pedtype 24 model #DNB3 in_car 203@ passenger_seat 1 
01C8: 147@ = create_actor_pedtype 24 model #DNB3 in_car 203@ passenger_seat 2 
01B2: give_actor 144@ weapon 28 ammo 500 
01B2: give_actor 145@ weapon 28 ammo 500 
01B2: give_actor 146@ weapon 28 ammo 500 
01B2: give_actor 147@ weapon 34 ammo 500 
Actor.WeaponAccuracy(144@) = 60
Actor.WeaponAccuracy(145@) = 60
Actor.WeaponAccuracy(146@) = 60
Actor.WeaponAccuracy(147@) = 60
Car.SetSpeedInstantly(203@, 20.0)

//West
0615: define_AS_pack_begin 132@ 
05D1: AS_actor -1 drive_car -1 to -2282.738 662.9602 48.6684 speed 30.0 3 model #NULL 5 
05D1: AS_actor -1 drive_car -1 to -2243.2644 643.9129 49.1276 speed 20.0 3 model #NULL 5 
0616: define_AS_pack_end 132@ 
0618: assign_actor 140@ to_AS_pack 132@
061B: remove_references_to_AS_pack 132@ 

//South
0615: define_AS_pack_begin 132@ 
05D1: AS_actor -1 drive_car -1 to -2253.6743 639.5866 48.7778 speed 25.0 3 model #NULL 5 
05D1: AS_actor -1 drive_car -1 to -2177.524 642.8537 48.4453 speed 10.0 3 model #NULL 5 
0616: define_AS_pack_end 132@ 
0618: assign_actor 144@ to_AS_pack 132@
061B: remove_references_to_AS_pack 132@ 

22@ = 0
:MISSN_14_MARKERS1
50@(22@,12i) = Marker.CreateAboveActor(140@(22@,12i))
Marker.SetIconSize(50@(22@,12i),1)
22@ += 1
if 
22@ == 8
jf @MISSN_14_MARKERS1

:MISSN_14_LOOP01
204@ = Car.Create(#SENTINEL, -2267.3154, 862.6004, 66.0368)
Car.Angle(204@) = 180.0
0129: 148@ = create_actor_pedtype 24 model #DNB3 in_car 204@ driverseat 
01C8: 149@ = create_actor_pedtype 24 model #DNB2 in_car 204@ passenger_seat 0 
01C8: 150@ = create_actor_pedtype 24 model #DNB1 in_car 204@ passenger_seat 1 
01C8: 151@ = create_actor_pedtype 24 model #DNB2 in_car 204@ passenger_seat 2 
01B2: give_actor 148@ weapon 28 ammo 500 
01B2: give_actor 149@ weapon 28 ammo 500 
01B2: give_actor 150@ weapon 28 ammo 500 
01B2: give_actor 151@ weapon 28 ammo 500 
Actor.WeaponAccuracy(148@) = 80
Actor.WeaponAccuracy(149@) = 80
Actor.WeaponAccuracy(150@) = 80
Actor.WeaponAccuracy(151@) = 80
Car.SetSpeedInstantly(204@, 40.0)

//North
0615: define_AS_pack_begin 132@ 
05D1: AS_actor -1 drive_car -1 to -2266.6638 664.5824 48.8751 speed 40.0 3 model #NULL 5 
0616: define_AS_pack_end 132@ 
0618: assign_actor 148@ to_AS_pack 132@
061B: remove_references_to_AS_pack 132@ 

22@ = 8
:MISSN_14_MARKERS2
50@(22@,12i) = Marker.CreateAboveActor(140@(22@,12i))
Marker.SetIconSize(50@(22@,12i),1)
22@ += 1
if 
22@ == 12
jf @MISSN_14_MARKERS2

20@ = 0
21@ = 0
22@ = 0

:MISSN_14_LOOP04
wait 0
if and
20@ == 0
01AE:   car 203@ sphere 0 near_point -2177.524 642.8537 radius 5.0 5.0 stopped 
then
20@ = 1
0792: disembark_instantly_actor 144@
0792: disembark_instantly_actor 145@
0792: disembark_instantly_actor 146@
0792: disembark_instantly_actor 147@
Actor.PutAt(144@,-2284.353, 659.2083, 48.8048)
Actor.PutAt(145@,-2286.549, 661.4846, 48.3952)
Actor.PutAt(146@,-2284.353, 661.4846, 48.8048)
Actor.PutAt(147@,-2286.549, 659.2083, 48.8048)
060B: set_actor 144@ decision_maker_to 34@ 
060B: set_actor 145@ decision_maker_to 34@ 
060B: set_actor 146@ decision_maker_to 34@ 
060B: set_actor 147@ decision_maker_to 34@ 
end
//Assault Car slides in from the West 
if 
00EC:   actor 140@ 0 near_point -2243.2644 643.9129 radius 5.0 5.0 
then
Car.PutAt(202@, -2243.2644, 643.9129, 49.1276)
Car.Angle(202@) = 220.0
0633: AS_actor 140@ exit_car 
0633: AS_actor 141@ exit_car 
0633: AS_actor 142@ exit_car 
0633: AS_actor 143@ exit_car 
060B: set_actor 140@ decision_maker_to 34@ 
060B: set_actor 141@ decision_maker_to 34@ 
060B: set_actor 142@ decision_maker_to 34@ 
060B: set_actor 143@ decision_maker_to 34@   
end
//Assault Car slides in from the South 
if 
00EC:   actor 144@ 0 near_point -2253.6743 639.5866 radius 6.0 6.0 
then
    07DB: set_car 203@ rotation_velocity_XYZ 0.0 0.0 -0.5 through_center_of_mass     
end
//Assault Car slides in from the North 
if and
21@ == 0
00EC:   actor 148@ 0 near_point -2266.6638 664.5824 radius 3.0 3.0 
then
    07DB: set_car 204@ rotation_velocity_XYZ 0.0 0.0 1.0 through_center_of_mass 
    21@ = 1    
end

if 
00EC:   actor 148@ 0 near_point -2264.0 639.5 radius 7.0 7.0  
then
wait 1500
0633: AS_actor 148@ exit_car 
0633: AS_actor 149@ exit_car 
0633: AS_actor 150@ exit_car 
0633: AS_actor 151@ exit_car 

060B: set_actor 148@ decision_maker_to 34@ 
060B: set_actor 149@ decision_maker_to 34@ 
060B: set_actor 150@ decision_maker_to 34@ 
060B: set_actor 151@ decision_maker_to 34@ 
0350: set_actor 150@ maintain_position_when_attacked true 
0350: set_actor 151@ maintain_position_when_attacked true 
end

if 
not Actor.Dead(105@)
then
if 
not Actor.Dead(148@)
then
05E2: AS_actor 105@ kill_actor 148@ 
else
if
not Actor.Dead(149@)
then
05E2: AS_actor 105@ kill_actor 149@
else
if
not Actor.Dead(150@)
then
05E2: AS_actor 105@ kill_actor 150@
else
if
not Actor.Dead(151@)
then
05E2: AS_actor 105@ kill_actor 151@
end
end
end
end
end

if 
not Actor.Dead(106@)
then
if 
not Actor.Dead(148@)
then
05E2: AS_actor 106@ kill_actor 147@ 
else
if
not Actor.Dead(149@)
then
05E2: AS_actor 106@ kill_actor 146@
else
if
not Actor.Dead(150@)
then
05E2: AS_actor 106@ kill_actor 145@
else
if
not Actor.Dead(151@)
then
05E2: AS_actor 106@ kill_actor 144@
end
end
end
end
end

if 
not Actor.Dead(107@)
then
if 
not Actor.Dead(148@)
then
05E2: AS_actor 107@ kill_actor 150@ 
else
if
not Actor.Dead(149@)
then
05E2: AS_actor 107@ kill_actor 144@
else
if
not Actor.Dead(150@)
then
05E2: AS_actor 107@ kill_actor 151@
else
if
not Actor.Dead(151@)
then
05E2: AS_actor 107@ kill_actor 146@
end
end
end
end
end

if 
22@ == 0
then
if and
Actor.Dead(105@)
Actor.Dead(106@)
Actor.Dead(107@)           
then
03E5: show_text_box 'CS12'  
:MISSN_14_FBIDEAD
if
not Actor.Dead(140@(22@,12i))
then
05E2: AS_actor 140@(22@,12i) kill_actor $PLAYER_ACTOR
end
22@ += 1
if 
22@ == 12
jf @MISSN_14_FBIDEAD
end
end
23@ = 0
24@ = 0
:MISSN_14_DNDEAD
if
Actor.Dead(140@(23@,12i))
then
Marker.Disable(50@(23@,12i))
24@ += 1
end
23@ += 1
if 
23@ == 12
jf @MISSN_14_DNDEAD

if 
24@ == 12
jf @MISSN_14_LOOP04 

if and
Actor.Dead(105@)
Actor.Dead(106@)
Actor.Dead(107@)                      
jf @MISSN_14_LOOP01   
if
Car.Wrecked(203@)
then
203@ = Car.Create(#SENTINEL, -2177.524, 642.8537, 48.4453)
end
Car.Angle(203@) = 90.0
01C8: 101@ = create_actor_pedtype 26 model #SPECIAL02 in_car 203@ passenger_seat 0 
0129: 102@ = create_actor_pedtype 26 model #NULL in_car 203@ driverseat 

020C: create_explosion_with_radius 6 at -2240.0 643.9129 49.1276
wait 50
020C: create_explosion_with_radius 6 at -2242.0 643.9129 49.1276
wait 50
020C: create_explosion_with_radius 6 at -2243.0 643.9129 49.1276

0615: define_AS_pack_begin 132@ 
05D1: AS_actor -1 drive_car -1 to -2245.5339 642.1523 49.1226 speed 30.0 3 model #NULL 5 
05D1: AS_actor -1 drive_car -1 to -2227.196 458.2865 34.694 speed 25.0 3 model #NULL 5 
0616: define_AS_pack_end 132@ 
0618: assign_actor 102@ to_AS_pack 132@
061B: remove_references_to_AS_pack 132@
20@ = 0                      
:MISSN_14_LOOP05
wait 0

if and
20@ == 0
00EC:   actor 102@ 0 near_point -2245.5339 642.1523 radius 3.0 3.0 
then
07DB: set_car 203@ rotation_velocity_XYZ 0.0 0.0 1.0 through_center_of_mass 
20@ = 1    
end

if 
00EC:   actor 102@ 0 near_point -2227.196 458.2865 radius 15.0 15.0 
jf @MISSN_14_LOOP05

030C: progress_made += 1 
0394: play_music 1 
Player.ClearWantedLevel($PLAYER_CHAR)
01E3: show_text_1number_styled GXT 'M_PASSR' number 7 time 5000 style 1  // MISSION PASSED!~n~~w~RESPECT +
0998: add_respect 1
wait 5000

 //end mission
 0051: return
 
 :MISSN_14_PLAYSND
wait 0
if 
03D0:   wav 1 loaded 
jf @MISSN_14_PLAYSND
03D1: play_wav 1 
:MISSN_14_PLAYING
wait 0
if 
03D2:   wav 1 ended 
jf @MISSN_14_PLAYING
040D: unload_wav 1 
return
 
 :MISSN_14_FAILED
 $CRASH_MARKER = Marker.CreateIconAndSphere(16, -2126.9312, 654.1807, 52.3672)

 0051: return
 
 :MISSN_14_CLEANUP
 // This section is where you clean up the contents of your mission so you can end it
 0004: $ONMISSION = 0
 00D8: mission_cleanup
 0051: return

